home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-16 | 6.4 KB | 205 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWGraphx.fr
- // Release Version: $ ODF 3 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWGRAPHX_FR
- #define FWGRAPHX_FR
-
- #ifndef FWBLDDEF_H
- #include "FWBldDef.h"
- #endif
-
- #ifndef FWGRAPHX_K
- #include "FWGraphx.k"
- #endif
-
- #ifndef FWSTRING_FR
- #include "FWString.fr"
- #endif
-
- #ifndef SLGCONST_K
- #include "SLGConst.k"
- #endif
-
- #ifndef FWODMISC_FR
- #include "FWODMisc.fr"
- #endif
-
- //========================================================================================
- // type FW_RFont
- //========================================================================================
-
- type FW_RFont(FW_kFontResourceType)
- {
- FontSize:
- FW_RFixed;
- FontStyle:
- integer;
- FontName:
- FW_RStringData;
- };
-
- // Standard fonts defined in "SLGConst.k"
- #define FW_NORMAL_FONT { FW_FIX(12), FW_kPlain, "applFont" } // = Geneva on US systems
- #define FW_SYSTEM_FONT { FW_FIX(12), FW_kPlain, "systemFont" } // = Chicago on US systems
- #define FW_HELVETICA12 { FW_FIX(12), FW_kPlain, "Helvetica" }
- #define FW_TIMES12 { FW_FIX(12), FW_kPlain, "Times" }
- #define FW_COURIER12 { FW_FIX(12), FW_kPlain, "Courier" }
- #define FW_PALATINO12 { FW_FIX(12), FW_kPlain, "Palatino" }
-
- //========================================================================================
- // type FW_RColor
- //========================================================================================
-
- type FW_RColor
- {
- Red:
- integer;
- Green:
- integer;
- Blue:
- integer;
- };
-
- //========================================================================================
- // standard colors
- //========================================================================================
-
- #ifdef FW_BUILD_WIN
- #define FW_RGB_BLACK { 0x00, 0x00, 0x00 }
- #define FW_RGB_WHITE { 0xFF, 0xFF, 0xFF }
- #define FW_RGB_RED { 0xFF, 0x00, 0x00 }
- #define FW_RGB_YELLOW { 0xFF, 0xFF, 0x00 }
- #define FW_RGB_BLUE { 0x00, 0x00, 0xC0 }
- #define FW_RGB_GREEN { 0x00, 0xFF, 0x00 }
- #define FW_RGB_BROWN { 0x80, 0x80, 0x00 }
- #define FW_RGB_PURPLE { 0xFF, 0x00, 0xFF }
- #define FW_RGB_LIGHT_BLUE { 0x00, 0x00, 0xFF }
- #define FW_RGB_GRAY { 0x80, 0x80, 0x80 }
- #define FW_RGB_LIGHT_GRAY { 0xC0, 0xC0, 0xC0 }
- #define FW_RGB_DARK_GRAY { 0x40, 0x40, 0x40 }
- #endif
-
- #ifdef FW_BUILD_MAC
- #define FW_RGB_BLACK { 0x00, 0x00, 0x00 }
- #define FW_RGB_WHITE { 0xFF, 0xFF, 0xFF }
- #define FW_RGB_RED { 0xDD, 0x00, 0x00 }
- #define FW_RGB_YELLOW { 0xFF, 0xFF, 0x00 }
- #define FW_RGB_BLUE { 0x00, 0x00, 0xDD }
- #define FW_RGB_GREEN { 0x00, 0xEE, 0x00 }
- #define FW_RGB_BROWN { 0x99, 0x66, 0x00 }
- #define FW_RGB_PURPLE { 0x66, 0x00, 0x99 }
- #define FW_RGB_LIGHT_BLUE { 0x00, 0x99, 0xFF }
- #define FW_RGB_GRAY { 0x80, 0x80, 0x80 }
- #define FW_RGB_LIGHT_GRAY { 0xC0, 0xC0, 0xC0 }
- #define FW_RGB_DARK_GRAY { 0x40, 0x40, 0x40 }
- #endif
-
- //========================================================================================
- // Pattern Types
- //========================================================================================
-
- type FW_RPattern : FW_RArchivableObject(Label='patt')
- {
- // Abstract pattern base class
- };
-
- //========================================================================================
- // Black and White Pattern Class
- //========================================================================================
-
- type FW_RBWPattern : FW_RPattern(Label='bwpt')
- {
- PatternData:
- hex string[8];
- };
-
- //========================================================================================
- // Color Pattern Class
- //========================================================================================
-
- type FW_RColorPattern : FW_RPattern(Label='copt')
- {
- PatternData:
- hex string[64];
-
- ColorTable:
- integer = $$CountOf(ColorArray);
- array ColorArray
- {
- FW_RColor;
- };
- };
-
- //========================================================================================
- // standard black and white patterns
- //========================================================================================
-
- #define FW_PATTERN_BLACK $"FFFF FFFF FFFF FFFF"
- #define FW_PATTERN_WHITE $"0000 0000 0000 0000"
- #define FW_PATTERN_GRAY $"AA55 AA55 AA55 AA55"
- #define FW_PATTERN_LIGHT_GRAY $"8822 8822 8822 8822"
- #define FW_PATTERN_DARK_GRAY $"77DD 77DD 77DD 77DD"
- #define FW_PATTERN_HORIZONTAL $"FF00 0000 FF00 0000"
- #define FW_PATTERN_VERTICAL $"1111 1111 1111 1111"
- #define FW_PATTERN_FDIAGONAL $"8844 2211 8844 2211"
- #define FW_PATTERN_BDIAGONAL $"1122 4488 1122 4488"
- #define FW_PATTERN_CROSS $"8888 88FF 8888 88FF"
- #define FW_PATTERN_DIAGCROSS $"8855 2255 8855 2255"
- #define FW_PATTERN_ANT $"EE77 BBDD EE77 BBDD"
-
- //========================================================================================
- // type FW_RStyle
- //========================================================================================
-
- // Standard dashes and styles are defined in "SLGConst.k"
-
- type FW_RStyle
- {
- PenSize:
- FW_RFixed;
- Dash:
- integer;
- Pattern:
- FW_RPattern;
- };
-
- //========================================================================================
- // standard styles
- //========================================================================================
-
- #define FW_NORMAL_STYLE { FW_FIX(1), FW_kSolidLine, FW_RBWPattern(FW_PATTERN_BLACK) }
- #define FW_DASH_STYLE { FW_FIX(1), FW_kDash, FW_RBWPattern(FW_PATTERN_BLACK) }
- #define FW_DOT_STYLE { FW_FIX(1), FW_kDot, FW_RBWPattern(FW_PATTERN_BLACK) }
- #define FW_DASHDOT_STYLE { FW_FIX(1), FW_kDashDot, FW_RBWPattern(FW_PATTERN_BLACK) }
- #define FW_DASHDOTDOT_STYLE { FW_FIX(1), FW_kDashDotDot, FW_RBWPattern(FW_PATTERN_BLACK) }
-
- //========================================================================================
- // type FW_RInk
- //========================================================================================
-
- type FW_RInk
- {
- ForeColor:
- FW_RColor;
- BackColor:
- FW_RColor;
- TransferMode:
- unsigned longint;
- };
-
- //========================================================================================
- // standard inks
- //========================================================================================
-
- #define FW_NORMAL_INK { FW_RGB_BLACK, FW_RGB_WHITE, FW_kCopy }
- #define FW_NORMAL_TEXT_INK { FW_RGB_BLACK, FW_RGB_WHITE, FW_kOr }
- #define FW_INVERT_INK { FW_RGB_BLACK, FW_RGB_WHITE, FW_kInvert }
- #define FW_WHITE_ERASE_INK { FW_RGB_BLACK, FW_RGB_WHITE, FW_kErase }
-
- #endif